using Circus.CodeEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
namespace Circus.Syntax.CodeCompletion
{
	public class CommentInfo : CodeCompletionProvider, ICommentInfo, ICodeCompletionProvider, IList<IComparable>, ICollection<IComparable>, IEnumerable<IComparable>, IEnumerable
	{
		public virtual string Text
		{
			get
			{
				return (base.Count > 0) ? ((CommentInfoItem)base[0]).Text : string.Empty;
			}
			set
			{
				if (base.Count > 0)
				{
					((CommentInfoItem)base[0]).Text = value;
				}
				else
				{
					base.Add(new CommentInfoItem(value));
				}
				this.OnTextChanged();
			}
		}
		[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

		protected virtual void OnTextChanged()
		{
		}
		
		public CommentInfo()
		{
			base.Add(new CommentInfoItem(string.Empty));
		}
		public override string GetName(int index)
		{
			return this.Text;
		}
		public override string GetText(int index)
		{
			return this.Text;
		}
	}
}
